package com.xuan.singleton.lazy;

/**
 * 懒汉式单例 - 静态内部类
 * @推荐： 线程安全，延迟加载，效率较高
 */
public class Singleton5 {
    private Singleton5() {}

    private static class SingletonHolder {
        private static final Singleton5 INSTANCE = new Singleton5();
    }

    public static Singleton5 getInstance() {
        return SingletonHolder.INSTANCE;
    }
}
